<include file="public@header"/>
</head>
<body>
<div class="wrap js-check-wrap">
    <ul class="nav nav-tabs">
        <li class="active"><a href="{:url('User/index')}">用户列表</a></li>
        <li><a href="{:url('User/add')}">添加用户</a></li>
    </ul>
    <form class="well form-inline margin-top-20" method="get" action="{:url('User/index')}">
        <input type="text" class="form-control" name="keyword" style="width: 200px;" value="{:input('request.keyword/s','')}" placeholder="请输入用户名">
        <input type="submit" class="btn btn-primary" value="搜索" />
        <a class="btn btn-danger" href="{:url('User/index')}">清空</a>
    </form>
    <form method="post" class="js-ajax-form margin-top-20" action="{:url('User/order')}">
        <div class="table-actions">
            <button class="btn btn-sm btn-primary js-ajax-submit" type="submit">排序</button>
        </div>

        <table class="table table-hover table-bordered table-list">
            <thead>
            <tr>
                <th width="16"><label><input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x"></label></th>
                <th width="50">{:lang('SORT')}</th>
                <th width="50">ID</th>
                <th>用户名</th>
                <th>手机号</th>
                <th>图片</th>
                <th>是否展示</th>
                <th>创建时间</th>
                <th>修改时间</th>
                <th width="120">{:lang('ACTIONS')}</th>
            </tr>
            </thead>
            <tbody>
            <volist name="userList" id="user">
                <tr>
                    <td><input type="checkbox" class="js-check" data-yid="js-check-y" data-xid="js-check-x" name="ids[]" value="{$user.id}"></td>
                    <td><input name="list_orders[{$user.id}]" class="input input-order mr5" type="text" style="width: 50px;" value="{$user.list_order}"></td>
                    <td>{$user.id}</td>
                    <td>{$user.name}</td>
                    <td>{$user.mobile}</td>
                    <td><img src="/upload/{$user.image}" style="height: 40px; width: 80px;" class="img-thumbnail js-image-previewer"></td>
                    <td>
                        <eq name="$user.switch" value="1">
                            <a href="{:url('User/changeStatus', ['id' => $user['id']])}" class="btn btn-success btn-sm js-ajax-dialog-btn" data-msg="您确定要改为隐藏吗？">是</a>
                            <else/>
                            <a href="{:url('User/changeStatus', ['id' => $user['id']])}" class="btn btn-danger btn-sm js-ajax-dialog-btn" data-msg="您确定要改为显示吗？">否</a>
                        </eq>
                    </td>
                    <td>{$user.create_time}</td>
                    <td>{$user.update_time}</td>
                    <td>
                        <a class="btn btn-xs btn-primary" href="{:url('User/edit', array('id' => $user.id))}">{:lang('EDIT')}</a>
                        <a class="btn btn-xs btn-danger js-ajax-delete" href="{:url('User/delete', array('id' => $user.id))}">{:lang('DELETE')}</a>
                    </td>
                </tr>
            </volist>
            </tbody>
        </table>
        <div class="pagination">
            {$page}
        </div>
    </form>
</div>
<script src="__STATIC__/js/admin.js?v={$_static_version}"></script>
<script src="__STATIC__/js/js-image-previewer.js"></script>
<script>
</script>
</body>
</html>
